package com.example.teesystem.entity.vo.chapter;

import com.example.teesystem.common.valid.ValidErrorMessage;
import com.example.teesystem.common.valid.ValidId;
import com.example.teesystem.entity.vo.PageRequestVo;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

@Data
public class ChapterSelectVo {
    /**
     * 所属课程id
     */
    @ValidId(message = ValidErrorMessage.COURSE_ID_VALID_FAIL, ifCourseId = true)
    private Integer courseId;
    
    /**
     * 分页设置
     */
    @NotNull(message = ValidErrorMessage.PAGE_CONFIG_VALID_FAIL)
    @Valid
    private PageRequestVo pageConfig;
}